package com.bookstore.service.impl;

import com.bookstore.dao.UserDao;
import com.bookstore.dao.impl.UserDaoImpl;
import com.bookstore.entity.User;
import com.bookstore.service.UserService;

public class UserServiceImpl implements UserService {
    UserDao userDao=new UserDaoImpl();
    @Override
    public User login(User user) {
        return userDao.queryUserByUsernameAndPassword(user) ;
    }

    @Override
    public int register(User user) {
        return userDao.insertUser(user);
    }
}
